class PhotosController < ApplicationController
	before_filter :find_structure 
	
	def index
		@photos = @structure.photos.paginate(:all, :page=>params[:page], :per_page=>9, :order=>'position')
	end	
	
	private
	
	def find_structure
		@structure = Structure.by_kind(:gallery).find(:first)
	end
	
end
